﻿using d1Common;
using d1Common.Interface;
using d1Project.Modules.Common.do4A.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace d1Project.Modules.Common.do4A
{
    public class do4AModule : IDoModleService
    {
        public static string ModuleIdDefine = "do4A";
        public static string CacheGroupPermissonOpt = "$PermissionOpt";
        public static string CacheGroupUser1Token = "$User1Token";
        public static string CacheGroupUser2Token = "$User2Token";
        public static string CacheGroupUser3Token = "$User3Token";
        public static string CacheGroupUser4Token = "$User4Token";
        public static string CacheGroupToken1 = "$Token1";
        public static string CacheGroupToken2 = "$Token2";
        public static string CacheGroupToken3 = "$Token3";
        public static string CacheGroupToken4 = "$Token4";

        public string ModuleId
        {
            get
            {
                return ModuleIdDefine;
            }
        }

        public void onServiceInit()
        {
            //注册服务
            doServices.Instance.RegisterInstance<IDo4AService>(new Services.do4AServiceLocal());

        }

        public void onServiceLoaded()
        {
            //构建所有的权限列表
            PermissionMgr.Instance.RegisterAllPermissions();
        }
    }
}